package admin

import (
	"context"
	"server/internal/model"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) CrontabCategoryUpdate(ctx context.Context, req *system.CrontabCategoryUpdateReq) (res *system.CrontabCategoryUpdateRes, err error) {
	res = new(system.CrontabCategoryUpdateRes)
	res.Result, err = service.SystemCrontabCategory().UpdateByID(ctx, req.ID, model.SystemCrontabCategoryUpdateInput{
		Name:   req.Name,
		Remark: req.Remark,
	})
	return
}
